package com.android.superobstacleavoider;

import android.media.SoundPool;

import com.android.superobstacleavoider.framework.Sound;

public class GameSound implements Sound {
	private int m_soundId;
	private SoundPool m_soundPool;

	public GameSound(SoundPool a_soundPool, int a_soundId) {
		m_soundPool = a_soundPool;
		m_soundId = a_soundId;
	}

	@Override
	public void play(float a_volume) {
		m_soundPool.play(m_soundId, a_volume, a_volume, 0, 0, 1);
	}

	@Override
	public void dispose() {
		m_soundPool.unload(m_soundId);
	}
}
